import UIKit

//
@available(iOS 3.2, *)
extension QKC where AA :UIBezierPath {
	// Setting the path will create an immutable copy of the provided CGPathRef, so any further mutations on a provided CGMutablePathRef will be ignored.
    open func cgPath_qk_s(_ cgPath:  CGPath) -> QKC<AA,YY,ZZ, CGPath>{
		return link(next: cgPath).then_QK { $0.value.cgPath = cgPath }
	}
    open func cgPath_qk_g() -> QKC<AA,YY,ZZ, CGPath>{
		 self +^ self.value.cgPath
	}

	// Path info
    open func isEmpty_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.isEmpty
	}

    open func bounds_qk_g() -> QKC<AA,YY,ZZ, CGRect >{
		 self +^ self.value.bounds
	}

    open func currentPoint_qk_g() -> QKC<AA,YY,ZZ, CGPoint >{
		 self +^ self.value.currentPoint
	}

	// Drawing properties
    open func lineWidth_qk_s(_ lineWidth:  CGFloat) -> QKC<AA,YY,ZZ, CGFloat>{
		return link(next: lineWidth).then_QK { $0.value.lineWidth = lineWidth }
	}
    open func lineWidth_qk_g() -> QKC<AA,YY,ZZ, CGFloat>{
		 self +^ self.value.lineWidth
	}

    open func lineCapStyle_qk_s(_ lineCapStyle:  CGLineCap) -> QKC<AA,YY,ZZ, CGLineCap>{
		return link(next: lineCapStyle).then_QK { $0.value.lineCapStyle = lineCapStyle }
	}
    open func lineCapStyle_qk_g() -> QKC<AA,YY,ZZ, CGLineCap>{
		 self +^ self.value.lineCapStyle
	}

    open func lineJoinStyle_qk_s(_ lineJoinStyle:  CGLineJoin) -> QKC<AA,YY,ZZ, CGLineJoin>{
		return link(next: lineJoinStyle).then_QK { $0.value.lineJoinStyle = lineJoinStyle }
	}
    open func lineJoinStyle_qk_g() -> QKC<AA,YY,ZZ, CGLineJoin>{
		 self +^ self.value.lineJoinStyle
	}

		// Used when lineJoinStyle is kCGLineJoinMiter
    open func miterLimit_qk_s(_ miterLimit:  CGFloat ) -> QKC<AA,YY,ZZ, CGFloat >{
		return link(next: miterLimit).then_QK { $0.value.miterLimit = miterLimit }
	}
    open func miterLimit_qk_g() -> QKC<AA,YY,ZZ, CGFloat >{
		 self +^ self.value.miterLimit
	}

    open func flatness_qk_s(_ flatness:  CGFloat) -> QKC<AA,YY,ZZ, CGFloat>{
		return link(next: flatness).then_QK { $0.value.flatness = flatness }
	}
    open func flatness_qk_g() -> QKC<AA,YY,ZZ, CGFloat>{
		 self +^ self.value.flatness
	}

		// Default is NO. When YES, the even-odd fill rule is used for drawing, clipping, and hit testing.
    open func usesEvenOddFillRule_qk_s(_ usesEvenOddFillRule:  Bool ) -> QKC<AA,YY,ZZ, Bool >{
		return link(next: usesEvenOddFillRule).then_QK { $0.value.usesEvenOddFillRule = usesEvenOddFillRule }
	}
    open func usesEvenOddFillRule_qk_g() -> QKC<AA,YY,ZZ, Bool >{
		 self +^ self.value.usesEvenOddFillRule
	}

	// Path construction
    open func move_qk_f(to point: CGPoint) -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.move(to:point) +^ point
	}

    open func addLine_qk_f(to point: CGPoint) -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.addLine(to:point) +^ point
	}

    open func addCurve_qk_f(to endPoint: CGPoint, controlPoint1: CGPoint, controlPoint2: CGPoint) -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.addCurve(to:endPoint, controlPoint1:controlPoint1, controlPoint2:controlPoint2) +^ endPoint
	}

    open func addQuadCurve_qk_f(to endPoint: CGPoint, controlPoint: CGPoint) -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.addQuadCurve(to:endPoint, controlPoint:controlPoint) +^ endPoint
	}

    @available(iOS 4.0, *)
    open func addArc_qk_f(withCenter center: CGPoint, radius: CGFloat, startAngle: CGFloat, endAngle: CGFloat, clockwise: Bool) -> QKC<AA,YY,ZZ, CGPoint>{
		 self +^ self.value.addArc(withCenter:center, radius:radius, startAngle:startAngle, endAngle:endAngle, clockwise:clockwise) +^ center
	}

    open func close_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.close()
	}

    open func removeAllPoints_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.removeAllPoints()
	}

	// Appending paths
    open func append_qk_f(_ bezierPath: UIBezierPath) -> QKC<AA,YY,ZZ, UIBezierPath>{
		 self +^ self.value.append(bezierPath) +^ bezierPath
	}

	// Modified paths
    @available(iOS 6.0, *)
    open func reversing_qk_f() -> QKC<AA,YY,ZZ,UIBezierPath>{
		 self +^ self.value.reversing()
	}

	// Transforming paths
    open func apply_qk_f(_ transform: CGAffineTransform) -> QKC<AA,YY,ZZ, CGAffineTransform>{
		 self +^ self.value.apply(transform) +^ transform
	}

    open func contains_qk_f(_ point: CGPoint) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.contains(point)
	}

    open func setLineDash_qk_f(_ pattern: UnsafePointer<CGFloat>?, count: Int, phase: CGFloat) -> QKC<AA,YY,ZZ, UnsafePointer<CGFloat>?>{
		 self +^ self.value.setLineDash(pattern, count:count, phase:phase) +^ pattern
	}

    open func getLineDash_qk_f(_ pattern: UnsafeMutablePointer<CGFloat>?, count: UnsafeMutablePointer<Int>?, phase: UnsafeMutablePointer<CGFloat>?) -> QKC<AA,YY,ZZ, UnsafeMutablePointer<CGFloat>?>{
		 self +^ self.value.getLineDash(pattern, count:count, phase:phase) +^ pattern
	}

	// Path operations on the current graphics context
    open func fill_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.fill()
	}

    open func stroke_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.stroke()
	}

	// These methods do not affect the blend mode or alpha of the current graphics context
    open func fill_qk_f(with blendMode: CGBlendMode, alpha: CGFloat) -> QKC<AA,YY,ZZ, CGBlendMode>{
		 self +^ self.value.fill(with:blendMode, alpha:alpha) +^ blendMode
	}

    open func stroke_qk_f(with blendMode: CGBlendMode, alpha: CGFloat) -> QKC<AA,YY,ZZ, CGBlendMode>{
		 self +^ self.value.stroke(with:blendMode, alpha:alpha) +^ blendMode
	}

    open func addClip_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.addClip()
	}

}

